package com.yhy.wxzn.common.enums;

public enum HoistStatus {

    Auto(1, "自动"),
    Manual(2, "手动模式"),
    Fault(3, "维修模式");

    private final int value;
    private final String desc;

    HoistStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static HoistStatus ofValue(Integer target) {
        for (HoistStatus status : values()) {
            if (status.value == target) {
                return status;
            }
        }
        return null;
    }

}
